package com.jason.ladder.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jason.ladder.dao.GameDao;
import com.jason.ladder.model.Game;
import com.jason.ladder.model.User;
import com.jason.ladder.service.GameManager;

@Service("gameManager")
public class GameManagerImpl  implements GameManager{
	
	private GameDao gameDao;
	@Autowired
	public void setGameDao(GameDao gameDao) {
		
        this.gameDao = gameDao;
	}
	@Override
	public Game saveGame(Game game) {
		return gameDao.saveGame(game);
	}
	@Override
	public List<Game> getGamesForTimeFrame(User user, Date startDate,
			Date endDate) {
		return gameDao.getGamesForTimeFrame(user, startDate, endDate);
	}

}
